﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutoRetailsDLL
{
    public class JavaScriptString
    {
        /// <summary>
        /// 根据TagName及内容查找元素
        /// </summary>
        public static string getElementByText = @"
        function getElementByText(tagName,innerText) {
            var elements = document.getElementsByTagName(tagName);
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText==innerText) {
                    return elements[i];
                }
            } 
        }";
        /// <summary>
        /// 根据TagName及内容查找元素
        /// </summary>
        public static string getElementByTextAndClass = @"
        function getElementByTextAndClass(tagName,className,innerText) {
            var elements = document.getElementsByTagName(tagName);
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText==innerText) {
                    return elements[i];
                }
            } 
        }";
        /// <summary>
        /// 根据TagName及内容查找元素(模糊)
        /// </summary>
        public static string getElementByText2 = @"
        function getElementByText2(tagName,innerText) {
            var elements = document.getElementsByTagName(tagName);
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText.indexOf(innerText)!==-1) {
                    return elements[i];
                }
            } 
        }";
        /// <summary>
        /// 根据TagName及内容查找元素
        /// </summary>
        public static string getElementByTextAll = @"
       function getElementByTextAll(tagName,innerText) {
            var ele_list=[];
            var elements = document.getElementsByTagName(tagName);
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText==innerText) {
                    ele_list.push(elements[i]) ;
                }
            } 
            return ele_list;
        }";
        /// <summary>
        /// 根据TagName及内容查找元素
        /// </summary>
        public static string getElementByAttributeAndTextAll = @"
        function getElementByAttributeAndTextAll(attribute_key,attribute_value,innerText) {
            var ele_list=[];
            var elements = document.querySelectorAll('[attribute_key='attribute_value']');
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText==innerText) {
                    ele_list.push(elements[i]) ;
                }
            } 
            return ele_list;
        }";
        /// <summary>
        /// 根据TagName及内容查找元素
        /// </summary>
        public static string getElementByAttributeAndText = @"
        function getElementByAttributeAndTextAll(attribute_key,attribute_value,innerText) {
            
            var elements = document.querySelectorAll('[attribute_key=""attribute_value""]');
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText==innerText) {
                    return  elements[i];
                }
            } 
            
        }";
        /// <summary>
        /// 根据类名及内容查找元素
        /// </summary>
        public static string getElementByClassAndText = @"
        function getElementByClassAndText(className,innerText) {
            var elements = document.getElementsByClassName(className);
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText==innerText) {
                    return elements[i];
                }
            } 
        }
";
        /// <summary>
        /// 根据类名及内容查找元素(模糊查找)
        /// </summary>
        public static string getElementByClassAndText2 = @"
        function getElementByClassAndText2(className,innerText) {
            var elements = document.getElementsByClassName(className);
            for (let i = 0; i < elements.length; i++) {
                if (elements[i].innerText.indexOf(innerText)!==-1) {
                    return elements[i];
                }
            } 
        }";
        /// <summary>
        /// 解决input填写失效的问题
        /// </summary>
        public static string setInputValue = @"
        function setInputValue(inputDom,newText){
            let lastValue = inputDom.value;
            inputDom.value = newText;
            let event = new Event('input', { bubbles: true });
            let blurevent = new Event('blur', { bubbles: true });
            event.simulated = true;
            let tracker = inputDom._valueTracker;
            if (tracker) {
                tracker.setValue(lastValue);
            }
            inputDom.dispatchEvent(event);
            inputDom.dispatchEvent(blurevent);
        }
";
        #region 拼多多
        /// <summary>
        /// 登录会返回true，否则false
        /// </summary>
        public static string 拼多多_判断是否登录JS = @"
           _single_instance_for_check_login;
        ";
        public static string 拼多多_店铺信息按钮JS = @"
           document.getElementsByClassName('mms-header__user-info')[0];
        ";
        public static string 拼多多_退出当前账号JS = @"
            document.getElementsByClassName('logoutDesc')[0];
        ";
        public static string 拼多多_账号登录JS = @"
            getElementByText('div','账号登录');
        ";
        public static string 拼多多_账号输入框JS = @"
            document.getElementById('usernameId');
        ";
        public static string 拼多多_密码输入框JS = @"
            document.getElementById('passwordId');
        ";
        public static string 拼多多_登录按钮JS = @"
            getElementByText('button', '登录');
        ";      
        public static string 拼多多_发布新商品点击JS = @"
            getElementByText('span','发布新商品').click();
        ";
        public static string 拼多多_获取是否有快捷品类JS = @"
           (function(){
                return getElementByText('div','3C数码配件 > 手机配件 > 手机保护套/壳')!=null;
        })() 
        ";
        public static string 拼多多_获取店铺名JS = @"
           (function(){
                return document.getElementsByClassName('user-name-text')[0].textContent;
        })() 
        ";
        public static string 拼多多_快捷品类是否被点击JS = @"
           (function(){
                return getElementByClassAndText('checked','3C数码配件 > 手机配件 > 手机保护套/壳')!=null;
        })() 
        ";//            getElementByText('div','3C数码配件 > 手机配件 > 手机保护套/壳').click();
        public static string 拼多多_点击快捷品类JS = @"

            var uselist=document.getElementsByClassName('choose-category ');for (let index = 0; index < uselist.length; index++) {
            var ele= uselist[index];
            if (ele.innerText.indexOf('手机保护套/壳')>0) {
                ele.click();
            }
        }
        ";
        public static string 拼多多_快捷品类JS = @"
           (function(){
                var uselist=document.getElementsByClassName('choose-category ');for (let index = 0; index < uselist.length; index++) {
                var ele= uselist[index];
                    if (ele.innerText.indexOf('手机保护套/壳')>0) {
                    return ele;
                    }
                }
        })() 
        ";
        public static string 拼多多_选择数码电器品类JS = @"
            getElementByClassAndText('staple-name-container','数码电器').click();
        ";
        public static string 拼多多_数码电器JS = @"
            getElementByClassAndText('staple-name','数码电器');
        ";
        public static string 拼多多_3C数码配件JS = @"
            getElementByClassAndText('cate','3C数码配件');
        ";
        public static string 拼多多_手机配件JS = @"
           getElementByClassAndText('cate','手机配件');
        ";
        public static string 拼多多_手机保护套JS = @"
           getElementByClassAndText2('cate','手机保护套/壳');
        ";
        public static string 拼多多_发布该类商品_按钮JS = @"
           getElementByText('button','确认发布该类商品');
        ";
        public static string 拼多多_填写商品标题JS = @"
           getElementByText('button','确认发布该类商品').click();
        ";
        public static string 拼多多_上传按钮JS = @"
           getElementByTextAll('button','图片空间上传')[0];
        ";
        public static string 拼多多_本地上传按钮JS = @"
           document.querySelectorAll('[data-testid=""beast-core-icon-upload""]')[0];
        ";
        public static string 拼多多_选择图片按钮JS = @"
           getElementByText('button','选择图片');
        ";
        //看图片有没有对钩(return getElementByTextAll('div','1').length;)
        public static string 拼多多_判断是否上传完毕JS = @"
            (function(){
               return document.getElementsByClassName('CAD_beastCardChecked_5-148-0').length;
               
        })() 
        ";
        public static string 拼多多_确认上传完毕按钮JS = @"
            getElementByText('button','确认');
        ";
        public static string 拼多多_详情图上传JS = @"
            getElementByTextAll('button','图片空间上传')[2];
        ";
        public static string 拼多多_白底图上传JS = @"
            document.querySelectorAll('[data-tracking-click-viewid=""upload_white_bg_img""]')[0];
        ";
        public static string 拼多多_标题输入框JS = @"
            document.getElementById('basic.goods_name').getElementsByTagName('input')[0];
        ";
        public static string 拼多多_品牌输入框JS = @"
            document.getElementById('basic.propertys.0.value').getElementsByTagName('input')[0];
        ";
        public static string 拼多多_点击添加规格类型JS = @"
            getElementByText2('button','添加规格类型');
        ";
        public static string 拼多多_选择规格类型1JS = @"
            document.getElementsByClassName('goods-spec-row')[1].getElementsByClassName('IPT_input_5-126-0')[0].click();
            getElementByText('li','尺寸').click()
        ";
        public static string 拼多多_展开修改JS = @"
            getElementByText('div','展开修改');
        ";
        public static string 拼多多_选择其他模板JS = @"
            document.getElementById('cost_template_id').getElementsByTagName('input')[1];
        ";
        public static string 拼多多_提交并上架JS = @"
            document.getElementsByClassName('goods-footer')[0].getElementsByTagName('button')[0];
        ";
        public static string 拼多多_保存为草稿JS = @"
            document.getElementsByClassName('goods-footer')[0].getElementsByTagName('button')[1];
        ";
        public static string 拼多多_判断提交结束JS = @"
            (function(){
               return document.getElementsByClassName('submit-success-tip')[0]!=null;
        })() 
        ";
        #endregion
        #region 天猫
        public static string 天猫_点击上传主图JS = @"
        document.getElementsByClassName('image-wrap')[0].getElementsByTagName('input')[0].click();

        ";
        public static string 天猫_获取是否有快捷品类JS = @"
           (function(){
                return getElementByText('li','手机保护套/壳')==null;
        })() 
        ";
        public static string 天猫_点击快捷品类JS = @"
           getElementByText('li','手机保护套/壳').click();
        ";
        public static string 天猫_3C数码配件JS = @"
            getElementByText('li','3C数码配件').click();
        ";
        public static string 天猫_手机配件JS = @"
           getElementByText('li','手机配件').click();
        ";
        public static string 天猫_手机保护套JS = @"
           getElementByText('li','手机保护套/壳').click();
        ";

        public static string 天猫_点击品牌输入框JS = @"
           document.getElementsByClassName('content')[1].getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_输入品牌JS = @"
           var ele=document.getElementsByClassName('options-search')[0].getElementsByTagName('input')[0];setInputValue(ele,'{0}')
        ";
        public static string 天猫_判断品牌是否存在JS = @"
           (function(){{
                return getElementByClassAndText('info-content','{0}')!=null;
        }})() 
        ";
        public static string 天猫_选择品牌JS = @"
           getElementByClassAndText('info-content','{0}').click();
        ";
        public static string 天猫_输入型号JS = @"
           var ele=document.getElementById('struct-p-20000~1').getElementsByTagName('input')[0];setInputValue(ele,'{0}')
        ";

        public static string 天猫_点击下一步完善商品信息JS = @"
           getElementByText('button','下一步, 完善商品信息').click()
        ";
        public static string 天猫_判断是否进入到商品详情页面JS = @"
           (function(){
                return getElementByText('button','提交')!=null;
        })() 
        ";
        public static string 天猫_点击风格设置 = @"
            getElementByText('button','设置').click()
        ";
        public static string 天猫_选择风格 = @"
            getElementByClassAndText('next-checkbox-wrapper','{0}').click()
        "; 
        public static string 天猫_确认风格 = @"
            getElementByText('button','确定').click()
        ";
        public static string 天猫_点击款式 = @"
            document.getElementById('struct-p-122276315').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_搜索款式 = @"
            var ele =document.getElementsByClassName('options-search')[0].getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_选择款式 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_点击适用手机机型 = @"
            document.getElementById('struct-p-28102').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_搜索适用手机机型 = @"
            var ele =document.getElementsByClassName('options-search')[0].getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_选择适用手机机型 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_填写型号 = @"
            var ele=document.getElementById('struct-p-28102~1').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_选择机型 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_点击保护套质地 = @"
            document.getElementById('struct-p-20021').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_搜索保护套质地 = @"
            var ele =document.getElementsByClassName('options-search')[0].getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_选择保护套质地 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_填写流行元素 = @"
            var ele=document.getElementById('struct-p-231100582').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_点击是否可降解 = @"
            document.getElementById('struct-p-126262305').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_选择是否可降解 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_填写生产企业 = @"
            var ele=document.getElementById('struct-p-12060095').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_点击是否使用环保材质 = @"
            document.getElementById('struct-p-248860265').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_选择是否使用环保材质 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_点击功能 = @"
            document.getElementById('struct-p-20019').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_搜索功能 = @"
            var ele =document.getElementsByClassName('options-search')[0].getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_选择功能 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_填写厚度 = @"
             var ele=document.getElementById('struct-p-34375').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
       
        public static string 天猫_点击是否支持5G信号 = @"
            document.getElementById('struct-p-271031156').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_选择是否支持5G信号 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_点击适用手机型号 = @"
            document.getElementById('struct-p-228680323').getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_搜索适用手机型号 = @"
            var ele=document.getElementById('struct-p-228680323').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        "; 
        public static string 天猫_进入手机型号 = @"
            document.getElementsByClassName('next-cascader-menu-wrapper')[0].getElementsByClassName('next-menu-item-text')[0].click();
        ";

        public static string 天猫_选择适用手机型号 = @"
            getElementByText('li','{0}').getElementsByTagName('span')[0].click()
        ";
        public static string 天猫_选择输入颜色 = @"
           var ele=document.getElementsByClassName('sell-color-item-container')[1].getElementsByTagName('input')[{0}];setInputValue(ele,'{1}');
        ";
        public static string 天猫_点击新增颜色 = @"
           var ele=document.getElementsByClassName('sell-color-item-container')[1];ele.getElementsByTagName('button')[1].click();
        ";
        public static string 天猫_点击今日发货 = @"
           var ele=document.getElementsByClassName('tm-delivery-time')[0].getElementsByClassName('radio-item')[0].getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_点击48小时发货 = @"
          var ele=document.getElementsByClassName('tm-delivery-time')[0].getElementsByClassName('radio-item')[1].getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_输入一口价 = @"
          var ele=document.getElementById('struct-price').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_输入商家编码 = @"
          var ele=document.getElementById('struct-outerId').getElementByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_输入条形码 = @"
          var ele=document.getElementById('struct-tmallBarcode').getElementByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_点击启用多件优惠 = @"
          var ele=document.getElementById('struct-multiDiscountPromotion');ele.getElementsByTagName('input')[0].click();
        ";
        public static string 天猫_输入多件折扣 = @"
          var ele=document.getElementById('struct-multiDiscountPromotion').getElementsByTagName('input')[2];setInputValue(ele,'{0}');
        ";
        public static string 天猫_输入物流体积 = @"
          var ele=document.getElementById('struct-itemSizeWeight').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_输入物流重量 = @"
          var ele=document.getElementById('struct-itemSizeWeight').getElementsByTagName('input')[1];setInputValue(ele,'{0}');
        ";
        public static string 天猫_所在地点击大陆及港澳台 = @"
          var ele=document.getElementById('struct-location').getElementsByTagName('input')[0];ele.click();
        ";
        public static string 天猫_点击所在地省份 = @"
            var ele =document.getElementsByClassName('area')[0].getElementsByTagName('input')[0].click()
        ";
        public static string 天猫_搜索所在地省份 = @"
            var ele =document.getElementsByClassName('options-search')[0].getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_选择所在地省份 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_点击所在地城市 = @"
            var ele =document.getElementsByClassName('area')[0].getElementsByTagName('input')[1].click()
        ";
        public static string 天猫_搜索所在地城市 = @"
            var ele =document.getElementsByClassName('options-search')[0].getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_选择所在地城市 = @"
            getElementByClassAndText('options-item','{0}').click()
        ";
        public static string 天猫_所在地点击其他国家或地区 = @"
          var ele=document.getElementById('struct-location').getElementsByTagName('input')[1];ele.click();
        ";
        public static string 天猫_提取方式点击邮寄 = @"
          var ele=document.document.getElementById('struct-tmExtractWay').getElementsByTagName('input')[1];ele.click();
        ";
        public static string 天猫_输入商品标题 = @"
          var ele=document.getElementById('struct-title').getElementsByTagName('input')[0];setInputValue(ele,'{0}');
        ";
        public static string 天猫_输入电脑端描述 = @"
          editor.insertHtml('{0}')
        "; //button-submit

        public static string 天猫_点击详情描述_图片 = @"
          var ele=document.getElementsByClassName('panel_edit_header--g0MPL')[0];ele.getElementsByTagName('img')[0].click()
        ";
        public static string 天猫_点击详情描述_上传图片 = @"
          getElementByText('button','上传图片').click();
        ";
        public static string 天猫_点击详情描述_上传 = @"
          document.getElementById('sucai-tu-upload').click();
        ";
        public static string 天猫_设置上传框居中 = @"
            var element = document.getElementById('skuImage');
            var x = element.getBoundingClientRect().left + window.scrollX;
            var y = element.getBoundingClientRect().top + window.scrollY;
            window.scrollTo(x,y)
        ";
        //用来间接判断上传是否成功
        public static string 天猫_获取有上传图片有几个DIV = @"
           (function(){
                return document.getElementsByClassName('Home_body__P3Ncj')[0].childElementCount;
        })() 
        ";
        public static string 天猫_选择上传图片 = @"
            var piclist=document.getElementsByClassName('PicList_PicturesShow_main-show__QVvZn');
            for (let index = 0; index < {0}; index++) {{
                var pic= piclist[index].getElementsByTagName('img')[0].click()
            }}
        ";
        public static string 天猫_点击详情描述_确认上传 = @"
           document.getElementsByClassName('Footer_selectOk__nEl3N')[0].click();
        ";



        public static string 天猫_点击提交 = @"
            var ele=document.getElementById('struct-buttons').getElementsByTagName('button');
            for (let index = 0; index < ele.length; index++) {
                if (ele[index].getAttribute('class').indexOf('hidden')<0) {
                    ele[index].click()
                }
            }
        ";
        public static string 天猫_判断是否成功提交JS = @"
           (function(){
                return document.getElementById('success-container').innerText;
        })() 
        ";
        #endregion

        #region 京东
        public static string 京东_账号输入框JS = @"
            document.getElementById('loginname');
        ";
        public static string 京东_密码输入框JS = @"
            document.getElementsByTagName('input')[1];
        ";
        public static string 京东_登录按钮JS = @"
            getElementByText('button', '立即登录');
        ";
        public static string 京东_手机通讯JS = @"
            document.getElementById('9987');
        ";
        public static string 京东_手机配件JS = @"
           document.getElementById('830');
        ";
        public static string 京东_手机壳保护套JS = @"
           document.getElementById('866');
        ";
        public static string 京东_发布该类商品_按钮JS = @"
           getElementByText('button','下一步，完善其他商品信息');
        ";
        public static string 京东_标题输入框JS = @"
            document.getElementsByClassName('adv-input-popover')[0].getElementsByTagName('input')[1]
        ";
        public static string 京东_型号输入框JS = @"
            document.getElementsByClassName('shop-model')[0].getElementsByTagName('input')[0];
        ";
        public static string 京东_上传SPU按钮JS = @"
           document.getElementsByClassName('shop-img-upload__upload')[0];
        ";
        public static string 京东_详情图上传JS = @"
            getElementByClassAndText('rcd-button shop-editor_quick-edit-btn','添加图片');
        ";
        public static string 京东_本地上传按钮JS = @"
           getElementByClassAndText('rcd-button rcd-button--primary is-plain rcd-tooltip__trigger','本地上传');
        ";
        public static string 京东_判断是否上传完毕JS = @"
            (function(){
               return document.getElementsByClassName('dialog-card-item selected').length;
        })() 
        ";
        public static string 京东_确认上传完毕按钮JS = @"
            getElementByText('button','确 定');
        ";
        public static string 京东_点击添加颜色JS = @"
            document.getElementsByClassName('shop-template-input-float-window')[0];
        ";
        public static string 京东_确认选择颜色按钮JS = @"
            getElementByText('button','确定');
        ";
        public static string 京东_无理由退货按钮JS = @"
            document.getElementsByClassName('rcd-form-item is-required common-form-item')[0]
        ";
        public static string 京东_提交并上架JS = @"
            getElementByText('button','提交并上架');
        ";
        public static string 京东_保存为草稿JS = @"
            getElementByText('button','保存草稿');
        ";
        #endregion
        #region TEMU
        public static string TEMU_账号输入框JS = @"
            document.getElementById('usernameId');
        ";
        public static string TEMU_密码输入框JS = @"
            document.getElementById('passwordId');
        ";
        public static string TEMU_登录按钮JS = @"
            getElementByText('button', '登录');
        ";
        public static string TEMU_同意隐私政策JS = @"
            document.querySelectorAll('[mode=""checkbox""]')[0]
        ";
        public static string TEMU_手机通讯JS = @"
            getElementByText('li','手机和配件');
        ";
        public static string TEMU_手机配件JS = @"
           getElementByText('li','手机壳及外壳');
        ";
        public static string TEMU_手机壳保护套JS = @"
           getElementByText('li','手机壳、套');
        ";
        public static string TEMU_发布该类商品_按钮JS = @"
           getElementByText('button','下一步');
        ";
        public static string TEMU_本地上传按钮JS = @"
           getElementByText('a','本地上传');
        ";
        public static string TEMU_判断是否重复上传JS = @"
            (function(){
               return getElementByText('button','在列表中查看').innerText;
        })() 
        ";
        public static string TEMU_判断是否上传完毕JS = @"
            (function(){
               return document.getElementsByClassName('index-module_materialName__3HQ4H')[0].innerText
        })() 
        ";
        public static string TEMU_确认上传完毕按钮JS = @"
            getElementByText('button','确认');
        ";
        public static string TEMU_标题输入框JS = @"
            document.getElementById('productName').getElementsByTagName('textarea')[0];
        ";
        public static string TEMU_商品产地国家下拉框JS = @"
            document.getElementById('productOriginCode').getElementsByTagName('input')[0];
        ";
        public static string TEMU_商品产地省份下拉框JS = @"
            document.getElementById('productOriginProvinceCode').getElementsByTagName('input')[0];
        ";
        public static string TEMU_敏感属性下拉框JS = @"
            document.getElementById('sensitiveAttr').getElementsByTagName('input')[0];
        ";
        public static string TEMU_最长边输入框JS = @"
            document.getElementById('len').getElementsByTagName('input')[0];
        ";
        public static string TEMU_次长边输入框JS = @"
            document.getElementById('width').getElementsByTagName('input')[0];
        ";
        public static string TEMU_最短边输入框JS = @"
            document.getElementById('height').getElementsByTagName('input')[0];
        ";
        public static string TEMU_重量输入框JS = @"
            document.getElementById('weight').getElementsByTagName('input')[0];
        "; 
        public static string TEMU_批量填写确认按钮JS = @"
            getElementByText('button','填写');
        "; 
        public static string TEMU_同意协议勾选按钮JS = @"
            document.getElementsByClassName('product-create_newButtonContainer__KvoZ-')[0].getElementsByTagName('input')[0];
        ";
        public static string TEMU_提交并上架JS = @"
            getElementByText('button','创建');
        ";
        public static string TEMU_保存为草稿JS = @"
            getElementByText('button','保存草稿');
        ";
        #endregion
    }
}
